Creating Context-Sensitive Cross-References for PDF Output
Cross-references to other topics may look different depending on whether they appear in online or print output. By editing the MadCap|xref.ConceptPageNumber style class in the stylesheet, you can set up your project so that cross-references appear as links in HTML5 output and as page references in PDF output. These cross-references are context-sensitive based on the location of the topic they are referencing. Therefore they may say “see [topic] below,” “see [topic] on the next page,” or “see [topic]” on a certain page, depending on the location of the topic.
- Open the main stylesheet from the Project Organizer.
- Select Switch To Advanced View if the stylesheet appears in the Simplified View.
- Locate the MadCap | xref basic selector.
- Click the arrow next to the basic selector to expand the list of style classes associated with it.
- Select the ConceptPageNumber style class.
- Select Show: Set Properties in the drop-down menu on the right of the Stylesheet Editor toolbar.
- Type mc-format in the Add Property field.
- Press enter.
- Click the ellipsis next to the field containing "{para}"
- Type {quote}{para}{quote} {pageref} in the field below "Enter format (preview below)."
- Click OK.
- Save the stylesheet to apply the changes.
This is an example of a cross-reference as it appears in the XML Editor.
This is the same cross-reference that is pictured above as it appears in a PDF output after editing the MadCap|xref.ConceptPageNumber style class.